#include "StdAfx.h"
#include "Message.h"

IMPLEMENT_DYNCREATE(CMessage,CObject);
CMessage::CMessage(void)
{
	Init();
}

CMessage::~CMessage(void)
{
}

void CMessage::Init()
{
	m_bClose = FALSE;
	m_strText = _T("");
	m_msgList.RemoveAll();
}

void CMessage::Serialize(CArchive &ar)
{
	if(ar.IsStoring())
	{
		ar << (BYTE)m_bClose;
		ar << m_strText;
	}
	else
	{
		BYTE wd;
		ar >> wd;
		m_bClose = (BOOL)wd;
		ar >> m_strText;
	}
	m_msgList.Serialize(ar);
}

#ifdef _DEBUG
void CMessage::AssertValid() const
{
	CObject::AssertValid();
}

void CMessage::Dump(CDumpContext &dc) const
{
	CObject::Dump(dc);
}

#endif